home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
gui
/
iedit226.lha
/
Include
/
iconstartup.i
next >
Wrap
Text File
|
1995-12-18
|
699b
|
33 lines
include dos/dosextens.i
movem.l d0/a0,-(sp)
sub.l a1,a1
move.l 4,a6
jsr _LVOFindTask(a6)
move.l d0,a4
tst.l pr_CLI(a4) ; was it called from CLI?
bne.s fromCLI ; if so, skip out this bit...
lea pr_MsgPort(a4),a0
move.l 4,a6
jsr _LVOWaitPort(A6)
lea pr_MsgPort(a4),a0
jsr _LVOGetMsg(A6)
move.l d0,returnMsg
fromCLI
movem.l (sp)+,d0/a0
go_program
bsr.s _main ; Calls your code..
move.l d0,-(sp)
tst.l returnMsg ; Is there a message?
beq.s exitToDOS ; if not, skip...
move.l 4,a6
jsr _LVOForbid(a6) ; note! No Permit needed!
move.l returnMsg(pc),a1
jsr _LVOReplyMsg(a6)
exitToDOS
move.l (sp)+,d0 ; exit code
rts
returnMsg dc.l 0
even ;(or cnop 0,2)
_main